package br.com.gaacorp.sai.webapp.action;

import java.io.Serializable;
import java.util.List;

import br.com.gaacorp.sai.webapp.action.BasePage;
import br.com.gaacorp.sai.model.Answer;
import br.com.gaacorp.sai.service.GenericManager;

public class AnswerList extends BasePage implements Serializable {
    private GenericManager<Answer, Long> answerManager;

    public void setAnswerManager(GenericManager<Answer, Long> answerManager) {
        this.answerManager = answerManager;
    }

    public AnswerList() {
        setSortColumn("answerId"); // sets the default sort column
    }

    public List getAnswers() {
        return sort(answerManager.getAll());
    }
}

